from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from django.conf.urls import url
from django.urls import path
from . import consumers
from multichat import consumers as multichat

websocket_urlpatterns = [
    url(r'^ws$', consumers.ChatConsumer),
    path("chat/stream/", multichat.ChatConsumer),
]

application = ProtocolTypeRouter({
    "websocket": AuthMiddlewareStack(
        URLRouter(
            websocket_urlpatterns
        )
    ),
})







